package com.hsteach.dao.mapper;

import com.hsteach.common.core.domain.AjaxResult;
import com.hsteach.dao.domain.patrol.Behavior;
import com.hsteach.dao.domain.patrol.BehaviorCategory;
import com.hsteach.service.patrol.BehaviorDetail;
import com.hsteach.web.controller.patrol.dto.QueryBehaviorDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author mgb
 * @version BehaviorMapper, java v1.0 2023-11-14 23:39 EXP $
 */
public interface BehaviorMapper {
    /**
     * 添加细则
     * @param behaviorDetail
     * @return
     */
    int addBehavior(BehaviorDetail behaviorDetail);
    /**
     * 编辑细则
     * @param behaviorDetail
     * @return
     */
    int updateBehavior(BehaviorDetail behaviorDetail);

    int deleteInfoByParentId(@Param("categoryId") int categoryId);

    List<Behavior> queryBehavior(@Param("firstCategory") String firstCategory,
                                 @Param("secondCategory") String secondCategory,
                                 @Param("keyword") String keyword,
                                @Param("orgCode") String orgCode);



    List<Behavior> getBehaviorById(@Param("parentId")List<Integer> ids);

    List<Behavior> queryCategoryByParentIdAndOrgCode(@Param("parentId") int parentId,@Param("orgCode") String orgCode);

    List<Behavior> queryCategoryByParentId(@Param("parentId") int parentId);

    void updateBehaviorByCategoryId(@Param("categoryId")int categoryId,
                                    @Param("firstCategory")String firstCategory,
                                    @Param("secondCategory")String secondCategory,
                                    @Param("orgCode") String orgCode);

//    List<Behavior> queryBehavior(QueryBehaviorDTO queryBehaviorDTO);

    int deleteBehavior(int id);
}
